
function editDeclaration() {
	$("#declarationShow").hide();
	$("#declaration").show();
	$("#btn_declaration_save").show();
	$("#btn_declaration_edit").attr("disabled", true);
}
function saveDeclaration() {
	var vendorId = $("#vendorId").val();
	var declaration = $("#declaration").val();
	var declarationShow = declaration.replace(/\n/g, "<br/>");
	declarationShow = declarationShow.replace(/ /g, "&nbsp;");
	$("#declarationShow").html(declarationShow).show();
	$("#declaration").hide();
	$("#btn_declaration_save").hide();
	$.ajax({url:context_path + "/order/saveDeclaration.do", type:"POST", data:({"vendorId":vendorId, "declaration":declaration}), success:function (responseMsg) {
		$("#btn_declaration_edit").attr("disabled", false);
	}});
}

